$fn=100;

tr();
module tr(){
    dd=23.3;
    side=dd/2*sqrt(3);
    rr=20;
    thin=3;
    difference(){
        union(){
            d_round_eq_tri(s=side,r=rr,height=thin);
            translate([0,0,3])difference(){
                cylinder(h=40,d=dd);
                cylinder(h=40.1,d=19.3);
            }
        }
        for(i=[0:120:240]){
            rotate([0,0,i])translate([0,(side*sqrt(3))/3+rr/2,0])union(){
                    cylinder(h=2,d=5.2);
                    translate([0,0,2])cylinder(h=1.1,d=10);
                }
            
        }
    }

}
module d_round_eq_tri(s=10,r=3,height=3){
    sx=s/2;
    sy=(s*sqrt(3))/6;
    linear_extrude(3)offset(r)polygon([[-sx,-sy],[sx,-sy],[0,2*sy]]);    
}
module sq(){
    difference(){
        translate([0,0,1.5])cube([60,60,3],center=true);
        poss=[[20,20],[20,-20],[-20,20],[-20,-20]];
        for(pos=poss){
            translate([pos[0],pos[1],0])cylinder(h=3.1,d=5.2);
            translate([pos[0],pos[1],2])cylinder(h=2,d=10);
        }
    }
    translate([0,0,3])difference(){
        cylinder(h=40,d=23.3);
        cylinder(h=40.1,d=19.3);
    }
}